Skip to content

Conversation

@zaki-yama
Copy link
Contributor

ref. #289

TODO: after #307 is merged, change the base branch to 3.0.

@zaki-yama zaki-yama self-assigned this May 28, 2019
@stomita stomita mentioned this pull request May 28, 2019
41 tasks
className?: string;
label?: string;
required?: boolean;
error?: any; // FIXME: should be FormElementProps.error
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix this after FormElement is converted to TypeScript

}

renderControl(radio) {
renderControl(radio: any) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't figure out how I can give more strict type annotation here and onChange prop.
It seems children are expected to only <Radio> component, but I didn't know how I express this.

: undefined
: undefined;

delete props.onChange;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since TypeScript doesn't recognize that a certain property is deleted, a type error occured here

<fieldset className={grpClassNames} style={grpStyles} {...props}>

(related to this? microsoft/TypeScript#13783)

So I used destructuring assignment above.

@zaki-yama
Copy link
Contributor Author

Closed because the last PR #342 had been merged.

@zaki-yama zaki-yama closed this Oct 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants